<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>reverse()</title>
	</head>
	<body>
		<script>
			// reverse() 方法用于颠倒数组，并返回颠倒后的数组
			// 此方法改变数组

			let arr = [1, 2, 3, 4];
			arr.reverse();
			console.log(arr);
		</script>
	</body>
</html>
